# 函数 定义 引用
def func():
    print("hello world")
    print('函数')
func()

def func2(a,b):
    c = a + b
    return c
result = func2(1, 2)
print(result)

def divid(a,b):
    shang = a // b
    yushu = a % b
    return shang,yushu
sh,yu = divid(5,2) # 可以使用多个值接收返回值 即返回多个值
print(sh,yu)
# 练习
def func3():
    print("-"*30)
func3()

def func4():
    for i in range(5):
        func3()
func4()

def func5(a,b,c):
    count = a + b + c
    print(count)
    return count
func5(1,2,3)

def func6():
    count =  func5(1,2,3)
    temp = count /3
    print(temp)
    return temp
func6()

# 全局变量 局部变量